package com.hehua.web.observer.demo1;

public class SecretaryClient {
    public static void main(String[] args) {
        Boss boss = new Boss();
        StockObserver stockObserver = new StockObserver("张三", boss);
        NbaObserver stockObserver2 = new NbaObserver("张三2", boss);
        boss.attach(stockObserver);
        boss.attach(stockObserver2);
        boss.detach(stockObserver);

        boss.setSubjectState("我胡汉三回来了");
        boss.notifyAction();
    }
}
